home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
programr
/
ole2book.zip
/
CHAP06.ZIP
/
CHAP06
/
DDATAOBJ
/
MAKEFILE
< prev
next >
Wrap
Text File
|
1993-04-14
|
3KB
|
105 lines
#
# MAKEFILE
# Data Object DLL Chapter 6
#
# Copyright (c)1993 Microsoft Corporation, All Rights Reserved
#
# Kraig Brockschmidt, Software Design Engineer
# Microsoft Systems Developer Relations
#
# Internet : kraigb@microsoft.com
# Compuserve: >INTERNET:kraigb@microsoft.com
#
#Add '#' to the next line for 'noisy' operation
!CMDSWITCHES +s
#
#Compiler flags
#Use "SET RETAIL=1" from MS-DOS to compile non-debug version.
#
!ifndef RETAIL
CFLAGS = -c -nologo -Od -AS -Zipe -G2s -W3 -GA -GEd -Aw
LINK = /al:16/ONERROR:NOEXE/CO
DEFS = -DSTRICT -D_WINDLL -DDEBUG
!else
CFLAGS = -c -nologo -Oat -AS -Zpe -G2s -W3 -GA -GEd -Aw
LINK = /al:16/ONERROR:NOEXE
DEFS = -DSTRICT -D_WINDLL
!endif
.SUFFIXES: .h .obj .exe .cpp .res .rc
TARGET = ddataobj
PCHFILE = dataobj.h
goal: precomp.pch $(TARGET).dll
clean:
del *.pch
del *.obj
del *.res
del *.dll
PCHFLAGS= -Yu$(PCHFILE) -Fpprecomp.pch
LIBS = libw sdllcew compobj ole2 storage
INCLS = $(TARGET).h dataobj.h
OBJS1 = $(TARGET).obj dataobj.obj idataobj.obj
OBJS2 = ienumfe.obj render.obj
OBJS = $(OBJS1) $(OBJS2)
RCFILES = 16.bmp 64.bmp 256.bmp advisor.ico
#####
.cpp.obj:
echo +++++++++
echo Compiling $*.cpp
cl $(CFLAGS) $(PCHFLAGS) $(DEFS) $*.cpp
.rc.res:
echo +++++++++
echo Compiling Resources
rc -r $(DEFS) $*.rc
precomp.pch : $(PCHFILE)
echo +++++++++
echo Precompiling $(PCHFILE)
cl $(CFLAGS) $(DEFS) -Yc$(PCHFILE) -Fpprecomp.pch -Foprecomp precomp.cpp
#This rule builds a linker response file on the fly depending on debug flags
$(TARGET).dll : $(OBJS) $(TARGET).res $(TARGET).def
echo ++++++++++
echo Linking $@
echo libentry.obj precomp.obj + > $(TARGET).lrf
echo $(OBJS1) + >> $(TARGET).lrf
echo $(OBJS2) >> $(TARGET).lrf
echo $(TARGET).dll $(LINK) >> $(TARGET).lrf
echo nul/li >> $(TARGET).lrf
echo $(LIBS)/NOD/NOE >> $(TARGET).lrf
echo $(TARGET).def >> $(TARGET).lrf
link @$(TARGET).lrf
rc -v $(TARGET).res $(TARGET).dll
del $(TARGET).lrf
##### Dependencies #####
$(TARGET).obj : $(TARGET).cpp $(INCLS)
echo +++++++++
echo Compiling $*.cpp
cl -nologo $(CFLAGS) $(DEFS) $*.cpp
dataobj.obj : dataobj.cpp $(INCLS)
idataobj.obj : idataobj.cpp $(INCLS)
ienumfe.obj : ienumfe.cpp $(INCLS)
render.obj : render.cpp $(INCLS)
$(TARGET).res : $(TARGET).rc $(INCLS) $(RCFILES)